package ${package.Controller};


import org.springframework.web.bind.annotation.RequestMapping;

<#if restControllerStyle>
    import org.springframework.web.bind.annotation.RestController;
<#else>
    import org.springframework.stereotype.Controller;
</#if>
<#if superControllerClassPackage??>
    ${superControllerClassPackage};
</#if>

/**
* <p>
    * ${table.comment!} 接口类
    * </p>
*
* @author ${author}
* @since ${date}
*/
@Api("${table.comment!}相关接口")
@RestController
@RequestMapping("${controllerMappingHyphen}")
public class ${table.controllerName} extends ${superControllerClass} {
@Autowired
${table.serviceName} service;

@ApiOperation("分页")
@PostMapping("/page")
public ServiceResponse
<PageDTO
<${entity}PageDTO>> page(@RequestBody PageVO
    <${entity}PageVO> param) {
        PageDTO
        <${entity}PageDTO> result = service.selectForPage(param);
            return success(result);
            }

            @ApiOperation("根据id查询数据")
            @GetMapping("/byId")
            public ServiceResponse
            <SysDictDTO> getById(@RequestParam Long id) {
                return success(service.selectById(id, language));
                }

                }
                </#if>
